import org.junit.jupiter.api.*;

/**
 * @program: junit5_learning
 * @description: 重复
 * @author: CaoYong
 * @create: 2021-03-11 19:40
 **/
public class Repeated {

    @BeforeAll
    public static void beforeAll() {
        System.out.println("Before All");
    }

    @BeforeEach
    void beforeEach() {
        System.out.println("Before Each");
    }

    @RepeatedTest(value = 5, name = "{displayName} --> {currentRepetition}/{totalRepetitions}")
    @DisplayName("repeatTest")
    void repeatedTest(TestInfo testInfo, RepetitionInfo repetitionInfo) {
        System.out.println(testInfo.getDisplayName());
        System.out.println("currentRepetition:" + repetitionInfo.getCurrentRepetition());
    }
}
